<html>
   <head>
      <link rel="stylesheet" type="text/css" href="style.css" />
   </head>
   <body onload="">
<h2 class="comptitle">NED File <i>examples/ieee802154a/ieee802154a.ned</i></h2>
<table class="typetable">
   <tr>
      <th>Name</th>
      <th>Description</th>
   </tr>
<tr>
   <td>
      <a href="org.mixim.examples.ieee802154a.ieee802154a.html">ieee802154a</a>
      <i> (network)</i>
   </td>
   <td>

<p>This example illustrates the use of the IEEE 802.15.4A UWB-IR
simulation model implemented in MiXiM.
The omnetpp.ini files comprises two scenarios. Both scenarios
involve only two hosts.</p>
   </td>
</tr>
</table>
<h3 class="subtitle">Source code:</h3>
<pre class="src"><span style="color: #800000; font-weight: bold; ">package</span><span style="color: #000000; "> </span><span style="color: #000000; ">org</span><span style="color: #000000; ">.</span><span style="color: #000000; ">mixim</span><span style="color: #000000; ">.</span><span style="color: #000000; ">examples</span><span style="color: #000000; ">.</span><span style="color: #000000; ">ieee802154a</span><span style="color: #000000; ">;

</span><span style="color: #800000; font-weight: bold; ">import</span><span style="color: #000000; "> </span><span style="color: #000000; ">org</span><span style="color: #000000; ">.</span><span style="color: #000000; ">mixim</span><span style="color: #000000; ">.</span><span style="color: #000000; ">base</span><span style="color: #000000; ">.</span><span style="color: #000000; ">connectionManager</span><span style="color: #000000; ">.</span><span style="color: #000000; ">ConnectionManager</span><span style="color: #000000; ">;
</span><span style="color: #800000; font-weight: bold; ">import</span><span style="color: #000000; "> </span><span style="color: #000000; ">org</span><span style="color: #000000; ">.</span><span style="color: #000000; ">mixim</span><span style="color: #000000; ">.</span><span style="color: #000000; ">base</span><span style="color: #000000; ">.</span><span style="color: #000000; ">modules</span><span style="color: #000000; ">.</span><span style="color: #000000; ">BaseWorldUtility</span><span style="color: #000000; ">;
</span><span style="color: #800000; font-weight: bold; ">import</span><span style="color: #000000; "> </span><span style="color: #000000; ">org</span><span style="color: #000000; ">.</span><span style="color: #000000; ">mixim</span><span style="color: #000000; ">.</span><span style="color: #000000; ">base</span><span style="color: #000000; ">.</span><span style="color: #000000; ">modules</span><span style="color: #000000; ">.</span><span style="color: #000000; ">BaseUtility</span><span style="color: #000000; ">;
</span><span style="color: #800000; font-weight: bold; ">import</span><span style="color: #000000; "> </span><span style="color: #000000; ">org</span><span style="color: #000000; ">.</span><span style="color: #000000; ">mixim</span><span style="color: #000000; ">.</span><span style="color: #000000; ">modules</span><span style="color: #000000; ">.</span><span style="color: #000000; ">node</span><span style="color: #000000; ">.</span><span style="color: #000000; ">Host802154A</span><span style="color: #000000; ">;

</span><span style="color: #808080; font-style: italic; ">//
//This example illustrates the use of the IEEE 802.15.4A UWB-IR
//simulation model implemented in MiXiM.
//The omnetpp.ini files comprises two scenarios. Both scenarios
//involve only two hosts.
//
//The first scenario, named BERDistance, configures one host to
//sends ($nbPackets) packets to the other. The distance ($distance)
//between the two nodes is changed at each run. This is performed
//for two channel models (Ghassemzadeh-LOS and NLOS) so that the
//difference between a Line of Sight and a Non Line of Sight
//environment can be seen. 
//
//The second scenario is simpler. It only sends one packet at each
//time, and iterates over five channel models: Ghassemzadeh-LOS, 
//Ghassemzadeh-NLOS, CM1, CM2 and CM5.
//It allows to see the simulator representation of the maximum
//pulse amplitude over time, as modified by the various channel
//models.
//
//To run the scenarios, compile mixim, open a terminal and go to
//examples/ieee80154a. There, type:
//./runBERDistance.sh 
//to execute all runs of the Bit Error Rate over Distance scenario.
//The &quot;run&quot; script expects to find opp_run in the path. Thus, make sure 
//to have $OMNET_PATH/bin in your path. 
//
//You can also try:
//./runChannelPlots.sh
//to execute all runs of the channelPlots scenario.
//
//The results can be analyzed from within Omnet++. In the
//examples/ieee802154a directory, open the files BERDistance.anf
//or channelPlots.anf (depending on the scenario that you ran before).
//At the bottom of the window, switch from the Inputs tab to the Datasets
//tab. In the BERDistance.anf file, you will find a &quot;scatter chart BER_Distance&quot;
//item. Double-click on it to generate the graph.
//
//In the channelPlots.anf file, there are several graphs. Opening
//&quot;line chart Ghassemzadeh LOS&quot; will show the packet as modified by the 
//Ghassemzadeh LOS channel model. Compare it with &quot;line chart CM2&quot; to see
//the impact of the Power Delay Profile. By default, the view does not allow
//to see the pulse shapes, because of the ultra short duration (2 ns per pulse).
//Zoom repeatedly until you see a triangular shape, by holding down the &quot;Ctrl&quot;
//touch and drawing a zoom box with the mouse around the area to enlarge.
//
//For more information, please refer to:
//* the Omnet++ documentation at www.omnetpp.org/documentation and the user guide.
//* the MiXiM documentation
//* UWB-IR NED modules documentation and source code.
//
//Questions should be send to the Omnet++ mailing-list: omnetpp@googlegroups.com.
//
//acknowledgment 
//--------------
//this work was supported (in part) by the National Competence
//Center in Research on Mobile Information and Communication Systems
//NCCR-MICS, a center supported by the Swiss National Science
//Foundation under grant number 5005-67322.
// 
</span><span style="color: #800000; font-weight: bold; ">network</span><span style="color: #000000; "> </span><span style="color: #000000; ">ieee802154a</span><span style="color: #000000; ">
{
    </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">playgroundSizeX</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">m</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// x size of the area the nodes are in (in meters)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">playgroundSizeY</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">m</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// y size of the area the nodes are in (in meters)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">playgroundSizeZ</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">m</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// z size of the area the nodes are in (in meters)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">numHosts</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// total number of hosts in the network
</span><span style="color: #000000; ">
        </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;bgb=$playgroundSizeX,$playgroundSizeY,white,,;bgp=10,50&quot;</span><span style="color: #000000; ">);
    </span><span style="color: #800000; font-weight: bold; ">submodules</span><span style="color: #000000; ">:
        </span><span style="color: #000000; ">world</span><span style="color: #000000; ">: </span><span style="color: #000000; ">BaseWorldUtility</span><span style="color: #000000; "> {
            </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
                </span><span style="color: #000000; ">playgroundSizeX</span><span style="color: #000000; "> = </span><span style="color: #000000; ">playgroundSizeX</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">playgroundSizeY</span><span style="color: #000000; "> = </span><span style="color: #000000; ">playgroundSizeY</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">playgroundSizeZ</span><span style="color: #000000; "> = </span><span style="color: #000000; ">playgroundSizeZ</span><span style="color: #000000; ">;
                </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;p=250,0;i=misc/globe&quot;</span><span style="color: #000000; ">);

        }

        </span><span style="color: #000000; ">channelControl</span><span style="color: #000000; ">: </span><span style="color: #000000; ">ConnectionManager</span><span style="color: #000000; "> {
            </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
                </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;p=450,0;b=42,42,rect,red,,;i=abstract/multicast&quot;</span><span style="color: #000000; ">);

        }
        </span><span style="color: #000000; ">node</span><span style="color: #000000; ">[</span><span style="color: #000000; ">numHosts</span><span style="color: #000000; ">]: </span><span style="color: #000000; ">Host802154A</span><span style="color: #000000; "> {
            </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
                </span><span style="color: #000000; ">numHosts</span><span style="color: #000000; "> = </span><span style="color: #000000; ">numHosts</span><span style="color: #000000; ">;
                </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;p=50,50;b=42,42,rect,red,,;i=device/wifilaptop&quot;</span><span style="color: #000000; ">);

        }
    </span><span style="color: #800000; font-weight: bold; ">connections</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">allowunconnected</span><span style="color: #000000; ">:
                         </span><span style="color: #808080; font-style: italic; ">// all connections and gates are to be generated dynamically
</span><span style="color: #000000; ">
}

</span></pre>
   <hr><p class="footer"><a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top"><img src="by-sa.png"></a> This documentation is released under the <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top">Creative Commons license</a></p>
   </body>
</html>
